using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;

namespace ns20
{
	internal static class Class201
	{
		[CompilerGenerated]
		private sealed class Class202
		{
			public string string_0;

			public bool method_0(MethodInfo methodInfo_0)
			{
				return methodInfo_0.Name == string_0;
			}
		}

		[CompilerGenerated]
		private static Func<ParameterInfo, Type> func_0;

		[CompilerGenerated]
		private static Func<Type, IEnumerable<MethodInfo>> func_1;

		[CompilerGenerated]
		private static Func<Type, MethodInfo, MethodInfo> func_2;

		public static MethodInfo smethod_0(this Delegate delegate_0)
		{
			return delegate_0.Method;
		}

		public static MemberTypes smethod_1(this MemberInfo memberInfo_0)
		{
			return memberInfo_0.MemberType;
		}

		public static bool smethod_2(this Type type_0)
		{
			return type_0.ContainsGenericParameters;
		}

		public static bool smethod_3(this Type type_0)
		{
			return type_0.IsInterface;
		}

		public static bool smethod_4(this Type type_0)
		{
			return type_0.IsGenericType;
		}

		public static bool smethod_5(this Type type_0)
		{
			return type_0.IsGenericTypeDefinition;
		}

		public static Type smethod_6(this Type type_0)
		{
			return type_0.BaseType;
		}

		public static bool smethod_7(this Type type_0)
		{
			return type_0.IsEnum;
		}

		public static bool smethod_8(this Type type_0)
		{
			return type_0.IsClass;
		}

		public static bool smethod_9(this Type type_0)
		{
			return type_0.IsSealed;
		}

		public static bool smethod_10(this Type type_0)
		{
			return type_0.IsAbstract;
		}

		public static bool smethod_11(this Type type_0)
		{
			return type_0.IsVisible;
		}

		public static bool smethod_12(this Type type_0)
		{
			return type_0.IsValueType;
		}

		public static bool smethod_13(this Type type_0, string string_0, out Type type_1)
		{
			Type type = type_0;
			while (true)
			{
				if (type != null)
				{
					if (string.Equals(type.FullName, string_0, StringComparison.Ordinal))
					{
						break;
					}
					type = type.smethod_6();
					continue;
				}
				Type[] interfaces = type_0.GetInterfaces();
				int num = 0;
				while (true)
				{
					if (num < interfaces.Length)
					{
						Type type2 = interfaces[num];
						if (string.Equals(type2.Name, string_0, StringComparison.Ordinal))
						{
							break;
						}
						num++;
						continue;
					}
					type_1 = null;
					return false;
				}
				type_1 = type_0;
				return true;
			}
			type_1 = type;
			return true;
		}

		public static bool smethod_14(this Type type_0, string string_0)
		{
			Type type_;
			return type_0.smethod_13(string_0, out type_);
		}

		public static MethodInfo smethod_15(this Type type_0, string string_0, params Type[] type_1)
		{
			IEnumerable<MethodInfo> enumerable = from methodInfo_0 in type_0.GetMethods()
				where methodInfo_0.Name == string_0
				select methodInfo_0;
			foreach (MethodInfo item in enumerable)
			{
				if (item.smethod_16(type_1))
				{
					return item;
				}
			}
			return null;
		}

		public static bool smethod_16(this MethodInfo methodInfo_0, params Type[] type_0)
		{
			Type[] array = (from parameterInfo_0 in methodInfo_0.GetParameters()
				select parameterInfo_0.ParameterType).ToArray();
			if (array.Length != type_0.Length)
			{
				return false;
			}
			int num = 0;
			while (true)
			{
				if (num < array.Length)
				{
					if (array[num].ToString() != type_0[num].ToString())
					{
						break;
					}
					num++;
					continue;
				}
				return true;
			}
			return false;
		}

		public static IEnumerable<Type> smethod_17(this Type type_0)
		{
			try
			{
				Type[] interfaces = type_0.GetInterfaces();
				foreach (Type type in interfaces)
				{
					yield return type;
					try
					{
						Type[] interfaces2 = type.GetInterfaces();
						for (int j = 0; j < interfaces2.Length; j++)
						{
							yield return interfaces2[j];
						}
					}
					finally
					{
					}
				}
			}
			finally
			{
			}
		}

		public static IEnumerable<MethodInfo> smethod_18(this Type type_0)
		{
			List<Type> list = type_0.smethod_17().ToList();
			list.Add(type_0);
			return from type_01 in list
				from methodInfo_0 in type_01.GetMethods()
				select methodInfo_0;
		}

		[CompilerGenerated]
		private static Type smethod_19(ParameterInfo parameterInfo_0)
		{
			return parameterInfo_0.ParameterType;
		}

		[CompilerGenerated]
		private static IEnumerable<MethodInfo> smethod_20(Type type_0)
		{
			return type_0.GetMethods();
		}

		[CompilerGenerated]
		private static MethodInfo smethod_21(Type type_0, MethodInfo methodInfo_0)
		{
			return methodInfo_0;
		}
	}
}
